package com.hwadee.teachingprocessmanagementsystem.dto.teacher;

import com.hwadee.teachingprocessmanagementsystem.entity.AssessmentMethod;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LINKE
 * @ProjectName:teaching-process-management-system-back
 * @Title: TeacherAssessmentMethod
 * @Package com.hwadee.teachingprocessmanagementsystem.dto.teacher
 * @Description: 考核方式dto
 * @date 2024/7/18 1:28
 */

@Data
public class TeacherAssessmentMethodDto {
    private List<AssessmentMethod> teacherAssessmentMethodList;

    public void addTeacherAssessmentMethod(AssessmentMethod assessmentMethod) {
        if (this.teacherAssessmentMethodList == null) {
            this.teacherAssessmentMethodList = new ArrayList<AssessmentMethod>();
        }
        this.teacherAssessmentMethodList.add(assessmentMethod);
    }

    public void addTeacherAssessmentMethod(Integer methodId, String methodName,String methodDescription) {
        AssessmentMethod assessmentMethod = new AssessmentMethod();
        assessmentMethod.setMethodId(methodId);
        assessmentMethod.setName(methodName);
        assessmentMethod.setDescription(methodDescription);

        this.addTeacherAssessmentMethod(assessmentMethod);
    }
}
